
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">添加导航</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 导航名称 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="nav[title]"
                                           value="" placeholder="请输入名称" required>
                                </div>
                            </div>
                            <!--<div class="am-form-group">-->
                            <!--    <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 内容 </label>-->
                            <!--    <div class="am-u-sm-9 am-u-end">-->
                            <!--        <textarea class="" rows="6" placeholder="请输入帮助内容" name="nav[content]"></textarea>-->
                            <!--    </div>-->
                            <!--</div>-->
                            <div class="am-form-group">
                                  <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">
                                    选中的文字颜色 </label>
                                    <div class="am-u-sm-9 am-u-end">
                                        <input class="" type="color"
                                               name="nav[title_color]"  value="#fd3537" style="width:100px;height:40px;"  >
                                        <!--<button type="button" class="btn-resetColor am-btn am-btn-xs"-->
                                        <!--        @click.stop="onEditorResetColor(curItem.style, 'background', '#ffffff')">-->
                                        <!--    重置-->
                                        <!--</button>-->
                                    </div>
                                </div>
                                <div class="am-form-group">
                                  <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">
                                    未选中的文字颜色 </label>
                                    <div class="am-u-sm-9 am-u-end">
                                        <input class="" type="color"
                                            name="nav[title_color2]"  value="#6e6d6b" style="width:100px;height:40px;">
                                        <!--<button type="button" class="btn-resetColor am-btn am-btn-xs"-->
                                        <!--        @click.stop="onEditorResetColor(curItem.style, 'background', '#ffffff')">-->
                                        <!--    重置-->
                                        <!--</button>-->
                                    </div>
                                </div>
                              <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 选中的图标 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <div class="am-form-file">
                                        <div class="am-form-file">
                                            <button type="button"
                                                    class="uploadlogo am-btn am-btn-secondary am-radius" style="font-size: 1.22rem;padding: .5rem .9rem;">
                                                <i class="am-icon-cloud-upload"></i> 选择图片
                                            </button>
                                            <div class="uploader-list am-cf">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                                       <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 未选中的图标 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <div class="am-form-file">
                                        <div class="am-form-file">
                                            <button type="button"
                                                    class="uploadlogo2 am-btn am-btn-secondary am-radius"  style="font-size: 1.22rem;padding: .5rem .9rem;">
                                                <i class="am-icon-cloud-upload"></i> 选择图片
                                            </button>
                                            <div class="uploader-list am-cf">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                                  <div class="am-form-group">
                                       <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 跳转样式 </label>
                                        <div class="am-u-sm-9 am-u-end">
                                            <label class="am-radio-inline">
                                                <input type="radio" name="nav[item]" value="1"
                                                       data-am-ucheck
                                                 
                                                       required>
                                              内部网页跳转
                                            </label>
                                            <label class="am-radio-inline">
                                                <input type="radio" name="nav[item]" value="2"
                                                       data-am-ucheck
                                                       required>
                                               外部网页跳转
                                            </label>
                               
                                            <!--<div class="help__style help-block am-margin-top-xs">-->
                                            <!--    <small class="am-margin-left-xs">内部网页只填写小程序路径，外部网页请填写网址-->
                                            <!--    </small>-->
                                          
                                           
                                            <!--</div>-->
                                        </div>
                                    </div>
                            
                            
                                    <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 链接 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="nav[url]"
                                           value="" placeholder="请输入链接" required>
                                              <small class="am-margin-left-xs">
                                        <a href="<?= url('store/wxapp.page/links') ?>"
                                           target="_blank">查找小程序内部网页链接？</a>内部网页请在前面加<code>/</code>，例如：/pages/index/index  外部网页请填写完整链接，如 https://www.baidu.com
                                    </small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 排序 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="nav[num]"
                                           value="100" required>
                                </div>
                            </div>
                              <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 状态 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="nav[state]" value="1" data-am-ucheck
                                               checked>
                                        启用
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="nav[state]" value="0" data-am-ucheck>
                                        禁用
                                    </label>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary"> 提交
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 图片文件列表模板 -->
<script id="tpl-file-item" type="text/template">
    {{ each list }}
    <div class="file-item">
        <a href="{{ $value.file_path }}" title="点击查看大图" target="_blank">
            <img src="{{ $value.file_path }}">
        </a>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
    </div>
    {{ /each }}
</script>

<!-- 文件库弹窗 -->
{{include file="layouts/_template/file_library" /}}

<script src="assets/store/js/select.region.js?v=1.2"></script>
<script>
    $(function () {

        // 选中图片
        $('.uploadlogo').selectImages({
            name: 'nav[logo]'
        });
               // 未选中图片
        $('.uploadlogo2').selectImages({
            name: 'nav[logo2]'
        });
        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();

    });
</script>
